﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Data;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Globalization;
using Public;

namespace WebsiteAdmin.Salomon.LinkInfo
{
    public partial class LinkEdit : System.Web.UI.Page
    {
        public int pkid;
        public string linkTitle;
        public string linkURL;
        public int sortBy;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                pkid = Convert.ToInt32(Request["pkid"], CultureInfo.InvariantCulture);
                DataTable dtLink = Bll.Link.Single(Global.ConSalomon, pkid);
                if (dtLink.Rows.Count == 1)
                {
                    linkTitle = dtLink.Rows[0]["LinkTitle"].ToString();
                    linkURL = dtLink.Rows[0]["LinkURL"].ToString();
                    sortBy = Convert.ToInt16(dtLink.Rows[0]["SortBy"]);

                }
                dtLink.Dispose();
            }
        }
    }
}
